const express = require("express");
const path = require("path");
const app = express();
app.get("/my",(req,res)=>{
	res.sendFile(path.join(__dirname,"./my.html"))
})
app.get("/home",(req,res)=>{
	res.sendFile(path.join(__dirname,"./home.html"))
})
// /sum?a=1&b=2
app.get("/sum",(req,res)=>{
	const {a,b} = req.query;
	const sum = a/1+b/1;// 12
	res.json({
		ok:1,
		sum
	})
})
app.get("/info",(req,res)=>{
	res.json({
		ok:1,
		msg:"success"
	})
})
app.listen(8098,()=>{
	console.log("success")
})